<?php
////////////////////////////////////////////////////////////////////////////////////////
// Purpose: Get data from database and change the contents of the #content div
////////////////////////////////////////////////////////////////////////////////////////

require_once '../cmsadmin/model/includes/DbConnector.class.php';

$connector = new DBConnector();
$pageName = $_GET['q'];

//load content from database

$connector->query("SELECT content FROM page WHERE page = $pageName");
$content = $connector->fetchArrayFirst();

//process content for view

$content = html_entity_decode($content);

echo $content;

?>